class ConceptosCobroController < ApplicationController
  # GET /conceptos_cobro
  # GET /conceptos_cobro.json
  def index
    @conceptos_cobro = ConceptoCobro.all

    respond_to do |format|
      format.html # index.html.erb
      #format.json { render json: @conceptos_cobro }
    end
  end

  # GET /conceptos_cobro/1
  # GET /conceptos_cobro/1.json
  def show
    @concepto_cobro = ConceptoCobro.find(params[:id])

    respond_to do |format|
      format.html # show.html.erb
      #format.json { render json: @concepto_cobro }
    end
  end

  # GET /conceptos_cobro/new
  # GET /conceptos_cobro/new.json
  def new
    @concepto_cobro = ConceptoCobro.new

    respond_to do |format|
      format.html # new.html.erb
      #format.json { render json: @concepto_cobro }
    end
  end

  # GET /conceptos_cobro/1/edit
  def edit
    @concepto_cobro = ConceptoCobro.find(params[:id])
  end

  # POST /conceptos_cobro
  # POST /conceptos_cobro.json
  def create
    @concepto_cobro = ConceptoCobro.new(params[:concepto_cobro])

    respond_to do |format|
      if @concepto_cobro.save
        format.html { redirect_to conceptos_cobro_path, :notice=> 'Concepto cobro was successfully created.' }
       # format.json { render json: @concepto_cobro, status: :created, location: @concepto_cobro }
      else
        format.html { render :action=> "new" }
        #format.json { render json: @concepto_cobro.errors, status: :unprocessable_entity }
      end
    end
  end

  # PUT /conceptos_cobro/1
  # PUT /conceptos_cobro/1.json
  def update
    @concepto_cobro = ConceptoCobro.find(params[:id])

    respond_to do |format|
      if @concepto_cobro.update_attributes(params[:concepto_cobro])
        format.html { redirect_to conceptos_cobro_path, :notice=> 'Concepto cobro was successfully updated.' }
      #  format.json { head :no_content }
      else
        format.html { render :action=> "edit" }
        #format.json { render json: @concepto_cobro.errors, status: :unprocessable_entity }
      end
    end
  end

  # DELETE /conceptos_cobro/1
  # DELETE /conceptos_cobro/1.json
  def destroy
    @concepto_cobro = ConceptoCobro.find(params[:id])
    @concepto_cobro.destroy

    respond_to do |format|
      format.html { redirect_to conceptos_cobro_url }
      #format.json { head :no_content }
    end
  end
end
